package com.github.thinwonton.showcase.springboot.basic.anno.conditional;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

class ConditionApplication {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(ConditionConfigurer.class);
        CmdService cmdService = applicationContext.getBean(CmdService.class);

        System.out.println(applicationContext.getEnvironment().getProperty("os.name")
                + "系统下的列表命令为："
                + cmdService.listCommand());

        applicationContext.close();
    }
}
